<#include "/common/_layout.html"/>
<@layout>
<h1>学生管理&nbsp;&nbsp;
<a href="/student/add/${studentPage.pageNumber}-${studentPage.totalRow}">增加学生</a>
</h1>
<div class="table_box">
	<table class="list">
		<tbody>
			<tr>
				<th width="4%">id</th>
				<th width="27%">姓名</th>
				<th width="8%">性别</th>
				<th width="8%">年龄</th>
				<th width="20%">入学时间</th>
				<th width="10%">操作</th>
			</tr>
			
			<#list studentPage.getList() as x>
			<tr>
				<td style="text-align:left;">${x.id}</td>
				<td style="text-align:left;">${x.name}</td>
				<td style="text-align:left;"><#if x.sex==0>男<#elseif x.sex==1>女<#else>妖怪</#if></td>
				<td style="text-align:left;">${x.age}</td>
				<td style="text-align:left;">${x.cdate}</td>
				<td style="text-align:left;">
					&nbsp;&nbsp;<a href="/student/delete/${x.id}-${studentPage.pageNumber}-${studentPage.totalRow}">删除</a>
					&nbsp;&nbsp;<a href="/student/edit/${x.id}-${studentPage.pageNumber}">修改</a>
					&nbsp;&nbsp;<a href="/optcourse/1-${x.id}">选修</a>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<#include "/common/_paginate.html" />
	<@paginate currentPage=studentPage.pageNumber totalPage=studentPage.totalPage actionUrl="/student/" />
</div>
</@layout>